Added error handling to filesystem using programs