Takes pictures in separate thread for timelapse