Fixed gitfs race condition and added some error propagation