add error callback for fs-functions
add debug messages for fs-functions
remove unessesary debug message