fixed tilemap output and added -o option